﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="Navbar.aspx.cs" Inherits="admin_webconfig_Navbar" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head_Title" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Head" runat="Server">
    <link href="/Plugin/flexigrid1.2/css/flexigrid.pack.css" rel="stylesheet" type="text/css" />
    <script src="/Plugin/flexigrid1.2/js/flexigrid.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(function () {

            $("#TbList").flexigrid({
                height: 'auto',
                width: 'auto'
            });
        });

        //“添加” 按钮事件
        var AddAlter = function () {
            art.dialog.open('<%=MyUrl.ToAb("~/") %>Admin/webconfig/NavbarDetail.aspx?fun=add',
                            {
                                title: "添加导航",
                                id: 'AddAlter',
                                lock: true
                            });
        };


        //“编辑” 按钮事件
        var EditAlter = function (id) {
            art.dialog.open('<%=MyUrl.ToAb("~/") %>Admin/webconfig/NavbarDetail.aspx?fun=edit&id=' + id,
                            {
                                title: "编辑导航",
                                id: 'EditAlter',
                                lock: true
                            });
        };
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Title" runat="Server">
    网站配置 - 导航管理
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Control" runat="Server">
    <input type="button" value="添 加" onclick="AddAlter()" />
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Content" runat="Server">
    <table id="TbList">
        <thead>
            <tr>
                <th width="30" align="center">
                    序号
                </th>
                <th width="150" style="text-align: center;">
                    导航标题
                </th>
                <th width="350" style="text-align: center;">
                    导航链接地址
                </th>
                <th width="70" align="center">
                    状态
                </th>
                <th width="100" align="center">
                    创建时间
                </th>
                <th width="135" align="center">
                    操 作
                </th>
            </tr>
        </thead>
        <tbody>
            <asp:Repeater ID="rp_list" runat="server">
                <ItemTemplate>
                    <tr>
                        <td>
                            <%#Eval("OrderNum")%>
                        </td>
                        <td>
                            <%#Eval("Title")%>
                        </td>
                        <td>
                            <%#Eval("Url")%>
                        </td>
                        <td>
                            <%#Eval("IsDisabled").ToString() == "True" ? "已开启" : "已禁用"%>
                        </td>
                        <td>
                            <%#Convert.ToDateTime(Eval("CreateTime")).ToString("yyyy-MM-dd")%>
                        </td>
                        <td>
                            <span style="cursor: pointer; margin-right: 30px;" onclick="EditAlter('<%#Eval("ID")%>')">
                                修改</span>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </tbody>
    </table>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Foot" runat="Server">
</asp:Content>
